//
//  MoBanThirTennTwoCell.m
//  MoBan
//
//  Created by apple on 16/7/28.
//  Copyright © 2016年 apple. All rights reserved.
//

#import "MoBanThirTennTwoCell.h"
@interface MoBanThirTennTwoCell()
@property(nonatomic,strong)UILabel *lable1;
@property(nonatomic,strong)UILabel *lable2;
@property(nonatomic,strong)UILabel *lable3;
@property(nonatomic,strong)UILabel *lable4;
@property(nonatomic,strong)UILabel *lable5;
@property(nonatomic,strong)UILabel *lable6;
@property(nonatomic,strong)UILabel *lable7;
@end
@implementation MoBanThirTennTwoCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self addUI];
    }
    return self;
}
-(void)addUI
{

    self.lable1 = [[UILabel alloc]init];
    self.lable1.text = @"北京故宫天坛圆明园一日游";
    [self.contentView addSubview:self.lable1];
    
    self.lable2 = [[UILabel alloc]init];
    self.lable2.text =@"韩天坛通篇全网最低价";
    [self.contentView addSubview:self.lable2];
    
    self.lable3 = [[UILabel alloc]init];
    self.lable3.text =@"促销价220yuan";
    [self.contentView addSubview:self.lable3];
    
    self.lable4 = [[UILabel alloc]init];
    self.lable4.text =@"原件400";
    [self.contentView addSubview:self.lable4];
    
    self.lable5 = [[UILabel alloc]init];
    self.lable5.text = @"已享受双倍折扣抵用券";
    [self.contentView addSubview:self.lable5];
    
    
    self.lable6 = [[UILabel alloc]init];
    self.lable6.text = @"点评返现金500元";
    [self.contentView addSubview:self.lable6];
    
    self.lable7 = [[UILabel alloc]init];
    self.lable7.backgroundColor = [UIColor grayColor];
    [self.contentView addSubview:self.lable7];
}
-(void)layoutSubviews
{
    [super layoutSubviews];
    
    CGFloat lableWidth = KscrW-40*Kscr;
    CGFloat lableHight = 20*Kscr;
    
    self.lable1.frame = CGRectMake(10*Kscr, 5*Kscr, lableWidth, lableHight);
    self.lable2.frame = CGRectMake(10*Kscr, self.lable1.bottom+5*Kscr, lableWidth, lableHight);
   CGSize size = [Unit getSizeWithStrNo:@"促销价220yuan" hight:20*Kscr font:17*Kscr];
    self.lable3.frame = CGRectMake(10*Kscr, self.lable2.bottom+5*Kscr, size.width, 20*Kscr);
    self.lable4.frame = CGRectMake(self.lable3.right+10*Kscr, self.lable2.bottom+5*Kscr, 200*Kscr, 20*Kscr) ;
    self.lable5.frame = CGRectMake(10*Kscr, self.lable4.bottom+5*Kscr, lableWidth, lableHight);
    self.lable6.frame = CGRectMake(10*Kscr, self.lable5.bottom+5*Kscr, lableWidth, lableHight);
    self.lable7.frame = CGRectMake(0, self.lable6.bottom+5*Kscr, KscrW, 20*Kscr);
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
